#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>
void left_move(char arr[], int sz, int n)
{
	n %= sz;
	int left = 0;
	int right = n - 1;
	while (left < right)
	{
		char tem = arr[left];
		arr[left] = arr[right];
		arr[right] = tem;
		left++;
		right--;
	}
	left = n;
	right = sz - 1;
	while (left < right)
	{
		char tem = arr[left];
		arr[left] = arr[right];
		arr[right] = tem;
		left++;
		right--;
	}
	left = 0;
	right = sz - 1;
	while (left < right)
	{
		char tem = arr[left];
		arr[left] = arr[right];
		arr[right] = tem;
		left++;
		right--;
	}
	
}
int main()
{
	char arr[] = "ABCDEFGHI";
	int n = 0;
	scanf("%d", &n);
	left_move(arr, strlen(arr), n);
	printf(arr);
	return 0;
}